import { lazy } from 'react'
import { createBrowserRouter } from 'react-router-dom'
import constantRouter from './constantRouter'

const routes = createBrowserRouter([
  {
    path: '/',
    Component: lazy(() => import('@/core/layout/index')),
    children: constantRouter
  },
  {
    path: '/login',
    title: '登录',
    hidden: true,
    Component: lazy(() => import('@/views/login/index')),
  },
  {
    path: '*',
    title: '404',
    hidden: true,
    Component: lazy(() => import('@/views/notFond/index')),
  }
])

export default routes
